const assert = require('assert')
const { Given, When, Then } = require('@cucumber/cucumber')
const { getReservations } = require('../../apollo')


When('login user {string} requset reservations', function (username) {
  return getReservations(username).then((res) => {
    this.reservations = res
  })
})
Then('All the results are under the username {string} typeof res is array', function (username) {
  assert.equal((this.reservations instanceof Array), true)
})
